<template>
  <div>{{ state.count }}</div>
  <button v-on:click="increment">加</button>
</template>

<script>
import { reactive } from 'vue'
export default {
  name: 'base-2-reactive',
  setup() {
    const state = reactive({ count: 0 })
    function increment() {
      console.log(state.count);
      state.count++
    }
    return { state, increment }
  }
}
</script>

<style scoped></style>
